<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::match(['get', 'post'], 'create/works', 'UserController@createWorks'); // 上传作品
Route::post('zan/works', 'UserController@zan'); // 作品点赞
Route::get('works', 'WorksController@works'); // 获取作品列表
Route::any('wechat/service', 'WeChatController@service'); // 微信服务接口
Route::any('wechat/jssdk', 'WeChatController@jssdkJson'); // 获取微信jssdk配置接口
Route::any('wechat/addcard', 'WeChatController@addCard'); // 卡券下发接口

Route::get('draw/{id}', 'AdvertiController@draw'); // 用户抽奖
Route::get('apply', 'AnswerController@apply'); // 用户报名
Route::get('dial/draw', 'AnswerController@draw'); // 抽奖

Route::post('info/append/{id}', 'Cooperate\UserController@appendInfo'); // 用户添加信息
Route::get('info/{id}', 'Cooperate\UserController@info'); // 获取用户信息
Route::get('match/number', 'Cooperate\TroopsController@numberMatch'); // 匹配用户
Route::get('troops/info/{id}', 'Cooperate\TroopsController@info'); // 队伍详情
Route::get('troops/out/{id}', 'Cooperate\TroopsController@troopsOut'); // 退出
Route::get('troops/user', 'Cooperate\TroopsController@user'); // 用户队伍查询
Route::get('troops/check', 'Cooperate\TroopsController@check'); // 用户队伍查询
Route::get('troops/list', 'Cooperate\TroopsController@troopsList'); // 用户队伍查询

Route::get('sing/token', 'Sing\SingController@accessToken');
Route::match(['get', 'post'],'sing/test', 'Sing\SingController@test');
Route::match(['get', 'post'], 'sing/compose', 'Sing\SingController@compose');
Route::match(['get', 'post'], 'sing/photo', 'Sing\SingController@photo');

# 答题模块
Route::get('answer/member/wechat', 'Answer\AnswerController@weChatUser'); // 微信获取个人信息
Route::get('answer/member/info', 'Answer\AnswerController@memberInfo'); // 会员微信信息
Route::get('answer/challenge/level', 'Answer\AnswerController@challengeLevel'); // 关卡等级信息
Route::get('answer/challenge/record', 'Answer\AnswerController@challengeRecord'); // 闯关记录
Route::get('answer/pk/sponsor', 'Answer\AnswerController@pkSponsor'); // 发起挑战
Route::get('answer/pk/recordInfo', 'Answer\AnswerController@pkRecordInfo'); // 应战
Route::get('answer/pk/accept', 'Answer\AnswerController@pkAccept'); // 应战
Route::get('answer/pk/record', 'Answer\AnswerController@pkRecord'); // 我的pk记录
Route::get('answer/title', 'Answer\AnswerController@title'); // 我的徽章
Route::get('answer/seniority', 'Answer\AnswerController@seniority'); // 排行榜
Route::any('answer/add/residue', 'Answer\AnswerController@addResidue'); // 增加答题剩余次数
Route::any('answer/deduct/residue', 'Answer\AnswerController@deductResidue'); // 扣除答题剩余次数
Route::any('answer/update/answer', 'Answer\AnswerController@updateAnswerInfo'); // 修改答题记录
Route::any('answer/wechat/jssdk', 'WeChatController@jssdkJson'); // 获取微信jssdk配置接口
